class Add{
    double a,b,root1,root2;
    static double c;
    void setA(int a,int b,double c){
        this.a=a;
        this.b=b;
        Add.c=c;
    }
    void B(){
        if((Math.pow(b,2)-(4*a*c))>=0){
            root1=(b+(Math.sqrt(Math.pow(b,2)-(4*a*c))))/2*a;
            root2=(b-(Math.sqrt(Math.pow(b,2)-(4*a*c))))/2*a;
        }
        else {
            System.out.println("无解");
        }
    }
}
public class Main {
    public static void main(String[] args) {
        Add a=new Add();
        a.setA(-1,1,1);
        a.B();
        float a1=(float)a.root1;
        float a2=(float)a.root2;
        System.out.printf("%3.3f\n",a1);
        System.out.printf("%3.3f\n",a2);
    }
}